package com.hd.tools;

import javax.servlet.http.HttpSession;


public class SystemContext {
	
	private static ThreadLocal<HttpSession> tl = new ThreadLocal<HttpSession>();
	
	public static HttpSession getSession(){
		return tl.get();
	}
	
	public static void setSession(HttpSession session){
		HttpSession session2 = tl.get();
		if(session2==null){
			tl.set(session);
		}
	}
	public static void removeTL(){
		HttpSession session2 = tl.get();
		if(session2!=null){
			tl.remove();
		}
	}

}
